# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Corey Oliver <corey.jon.oliver@gmail.com>
pkgname=libzen
pkgver=0.4.39
pkgrel=0
pkgdesc="A shared library for libmediainfo and mediainfo"
url="https://github.com/MediaArea/ZenLib"
arch="all"
license="Zlib"
makedepends="cmake"
subpackages="$pkgname-dev"
source="https://mediaarea.net/download/source/libzen/$pkgver/libzen_$pkgver.tar.bz2"
options="!check"  # upstream does not provide tests
builddir="$srcdir/ZenLib/Project/CMake"

build() {
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DLIB_INSTALL_DIR=/usr/lib \
		-DCMAKE_VERBOSE_MAKEFILE=ON
	make -C build
}

check() {
	make -C build check
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="
f261a676cbde9a877b85df536306a035ede1acdc5d827049698d19b3ecd8a65e5f6cfe66851fda034e1b31c95f6d6e82b78b0bc35989ec1568a010fb88a5a2d8  libzen_0.4.39.tar.bz2
"
